<?php
/**
 * Created by PhpStorm.
 * User: Allen
 * Date: 2017/1/19
 * Time: 17:38
 */

namespace EWeiLink\JuPai\Http\Controllers;


use EWeiLink\JuPai\JuPai;
use EWeiLink\JuPai\Services\CustomerRepo;

class CustomerController
{

    protected $repoService;
    public function __construct(CustomerRepo $customerRepo)
    {
        $this->repoService = $customerRepo;
    }

    public function index()
    {
        $filter = JuPai::callBridgeHelper('get_filter', []);
        if (is_null($filter)) {
            $filter = [];
        }

        $data = $this->repoService->list($filter);

        return $data;
    }
    
}
